package com.xbongbong.saas.model;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.saas.domain.entity.PromotionActivityEntity;

import java.util.List;
import java.util.Map;


/**
 * @author bomfish
 */
public interface PromotionActivityModel {
   Long insert(PromotionActivityEntity entity) throws XbbException;

   void insertBatch(List<PromotionActivityEntity> list);

   List<PromotionActivityEntity> findEntities(Map<String, Object> param);

   Integer getEntityCount(Map<String, Object> param);

   void update(PromotionActivityEntity entity) throws XbbException;

   PromotionActivityEntity getByKey(Long key, String corpid);

   /**
    * 获取已经被使用的优先级
    * @param corpid
    * @return
    */
   List<Integer> getDisabledPriority (String corpid, Integer businessType);

   Integer deleteByKey(Long key, String corpid) throws XbbException;

    Integer getOnlinePromotionCount(String corpid);

    void updateStatus(List<PromotionActivityEntity> promotionActivityEntities, String corpid) throws XbbException;
}
